package dao;

import org.hibernate.Session;
import org.hibernate.Transaction;

import pojo.TblRegisterUser;

import comment.HibernateSessionFactory;

public class RegisterUserDao {
	Transaction tc = null;
	public void addTblManager(TblRegisterUser tblRegisterUser){
		try{
			Session session = HibernateSessionFactory.getSession();
			tc = session.beginTransaction();
			session.save(tblRegisterUser);
			tc.commit();
		}catch(Exception e){
			e.printStackTrace();
			if(tc!=null){
				tc.rollback();
			}
		}
		finally{
			HibernateSessionFactory.closeSession();
		}
	}

}
